package org.kymjs.kjframe.base;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;

import org.kymjs.kjframe.R;
import org.kymjs.kjframe.customview.SwipeBackLayout;


public class BaseActivity extends FragmentActivity{
    protected SwipeBackLayout layout;
    protected boolean isFinishTouth = false;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (isFinishTouth) {
            layout = (SwipeBackLayout) LayoutInflater.from(this).inflate(
                    R.layout.base, null);
            layout.attachToActivity(this);
//            overridePendingTransition(R.anim.base_slide_right_in, R.anim.base_slide_left_out);
//            overridePendingTransition(R.anim.slide_in_from_right, R.anim.slide_out_from_left);
        }

//        setContentView(R.layout.base_activity);

//        L.d("BaseActivity onCreate:");
//        setContentView(R.layout.main);
//        ButterKnife.bind(this);


    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
//        if (isFinishTouth)
//            overridePendingTransition(R.anim.slide_in_from_left, R.anim.base_slide_right_out);
//          if (isFinishTouth) overridePendingTransition(R.anim.slide_in_from_left, R.anim.slide_out_from_right);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

}

